package com.dunqi.gpm.shunqing.home.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.RecyclerView;

import com.chad.library.adapter.base.BaseViewHolder;
import com.dunqi.gpm.shunqing.R;
import com.dunqi.gpm.shunqing.common.base.BaseAct;
import com.dunqi.gpm.shunqing.common.base.RecyclerAdapter;
import com.dunqi.gpm.shunqing.common.view.ComTitleBar;
import com.dunqi.gpm.shunqing.common.view.RecyclerItemDecoration;
import com.dunqi.gpm.shunqing.home.bean.Inquiry;
import com.dunqi.gpm.shunqing.home.widget.EmptyView;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;

public class InquiryQueryActivity extends BaseAct {

    @BindView(R.id.title_bar)
    ComTitleBar titleBar;
    @BindView(R.id.recycler)
    RecyclerView recycler;
    @BindView(R.id.swipeRefresh)
    SwipeRefreshLayout swipeRefresh;

    ArrayList<Inquiry> data = new ArrayList<>();
    private InquiryQueryAdapter adapter;


    @Override
    protected void refreshData(Bundle savedInstanceState) {

    }

    @Override
    protected void initUiAndListener() {

        recycler.addItemDecoration(new RecyclerItemDecoration());
        adapter = new InquiryQueryAdapter(data);
        recycler.setAdapter(adapter);
        adapter.setEmptyView(new EmptyView(getActivity()));

    }

    class InquiryQueryAdapter extends RecyclerAdapter<Inquiry> {
        public InquiryQueryAdapter(@Nullable List<Inquiry> data) {
            super(R.layout.item_inquiry_query, data);
        }

        @Override
        protected void convert(BaseViewHolder helper, Inquiry item) {

        }
    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_inquiry_query;
    }

}
